package com.example.demo01.Entity.webEntity;

import org.springframework.stereotype.Component;

/**
 * 天地图发送请求时的参数类
 * */
@Component
public class TDTGeoCode {
    //attributes
    private String keyWord;
    private String addressName;
    //constructors
    public TDTGeoCode(){ this("keyWord","");}

    public TDTGeoCode(String addressName) {
        this("keyWord",addressName);
    }

    public TDTGeoCode(String keyWord, String addressName) {
        this.keyWord = keyWord;
        this.addressName = addressName;
    }

    //toString
    @Override
    public String toString() {
        return
                "{\"keyWord\":" +
                "\"" + addressName + "\"}";
    }

    //setter
    public void setKeyWord(String keyWord) { this.keyWord = keyWord; }
    public void setAddressName(String addressName) { this.addressName = addressName; }
    //getter
    public String getKeyWord() { return keyWord; }
    public String getAddressName() { return addressName; }
}
